﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <!--<script src="/static/js/angular.min.js"></script>-->
</head>
<body>
    <div ng-app="myApp" ng-controller="sitesCtrl">
        <div ng-include="'test2.html'"></div>
    </div>

    <script>

    </script>
    <script>

        var text = /<script[^>]+id=>.*<\/script>/i;
        var pat = /(<script[^>]+id=)['"]([^'"]+)["']>([.\S\s]*?)(<\/script>)/i
        var pat1 = /(<script>)([.\S\s]*?)(<\/script>)/i
        var str = '<script src="/static/js/angular.min.js"><\/script><script id="123">var a = 0;\n<\/script><script>var a = 123455;\n<\/script>';
        var pattern = new RegExp('<script id[^>]*>(.*?)<\/script>', 'i'); //匹配单个script标签内容的写法

        var aa = "C:\\AppsData\\Spon\\index.html";
        var bb = "C:\\AppsData\\Spon";
        aa = aa.replace(bb, "");
        aa = aa.substr(aa.lastIndexOf("\\") + 1, aa.length).replace(".html", "") + "_" + aa.length + ".js";

        var matchArr = str.match(pat1);
        debugger;
        var needStr = matchArr[1]; //内容XXXXX

        //var pattern = new RegExp('<script id[^>]*>(.*?)<\/script>', 'i');
        //var matchArr = content.match(pattern);
        //content = matchArr[0];

        var a = "\u8be5\u8d26\u53f7\u4e0d\u652f\u6301\u957f\u77ed\uff0c\u77ed\u4fe1\u5185\u5bb9\u4e0d\u80fd\u5927\u4e8e70\u5b57\u7b26";

        alert(a);

        //var app = angular.module("myApp", []);

        //app.controller("sitesCtrl", function ($scope) {
        //    $scope.firstName = "John";
        //    $scope.lastName = "Doe";
        //});

        //gulp中自动添加版本号
        //http://www.jb51.net/article/100652.htm
        //https://my.oschina.net/u/2399867/blog/759228

    </script>
</body>
</html>
